import { ProfileType } from '@/store/reducer/user';
import request from '@/utils/request';
// 用户信息
export const userinfoAPI = () => {
  return request({
    url: '/v1_0/user',
  });
};
// 用户个人资料
export const getuserporfileAPI = () => {
  return request({
    url: '/v1_0/user/profile',
  });
};
// 编辑照片
export const updatePhtotAPI = (data: FormData) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data,
  });
};
// 编辑性别
export const updateProfileAPI = (data: Partial<ProfileType>) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data,
  });
};
